// Copyright DustedPixels.com 2008. All rights reserved.

package com.dustedpixels.jasmin.unit.compiler;

import java.io.FileWriter;

/**
 * @author micapolos@gmail.com (Michal Pociecha-Los)
 */
public final class ProcessCodeWriterImpl implements ProcessCodeWriter {
  
  public void write(String processName, String code) throws Exception {
    FileWriter writer = new FileWriter(processName.replace('.', '/'));
    try {
      writer.write(code);
    } finally {
      writer.close();
    }
  }
}
